#include <iostream>
#include <functional>

typedef std::function<int(int,int)> myfunc;

class Task 
{
private:

    int _x;
    int _y;
    myfunc _func;

public:

    Task(){}

    Task(int x, int y, myfunc func)
        :_x(x)
        ,_y(y)
        ,_func(func)
    {}

    int operator()()
    {
        return _func(_x,_y);
    }

};